// src.module.DB.dataSourceAdaptation.js

var mysqldb = require("./mysqldb");
var mongodb = require("./mongodb");
var config = require('../../../config/index').db;

function DB(source){
    this.source = source;
}

DB.prototype.init = function(){
    if("mongodb" == config.datasource){
        DB = mysqldb.Instance();
    }
    if("mysql" == config.datasource){
        DB = mongodb;
    }
}

DB.prototype.queryJson = function (params) {
    if(typeof params == 'function'){
        params.callback.call(this);
    }
    if(typeof params == 'String'){

    }

}


module.exports =  DB;